package www.sofn.com.area;

import jakarta.annotation.Resource;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import www.sofn.com.area.domain.vo.AreaVO;

import java.util.List;

@Service
public class AreaService {

    @Resource
    private AreaMapper mapper;

    @Cacheable(value = "area", key = "#root.method+':'+#root.args[0]")
    public List<AreaVO> findByParentId(Integer parentId) {
       return  mapper.findByParentId(parentId);
    }
}
